A known sensor for measuring the density and viscosity of liquids is described in the article by Inaba et al, Sensors and Actuators A, 33 (1991), pages 163-166. In this known sensor, a bending reed is dipped into the medium, and is excited to a thermally induced vibration by irradiation with the assistance of a laser diode. The vibrational frequency is influenced by the density of the medium, and the damping of the vibration is influenced by the viscosity of the medium. Thus, the density and viscosity of the medium, which may correspond to a liquid, can be measured by measuring the vibration of the bending reed.